package at.fhj.itm10.ticketmaster.services;

import java.sql.SQLException;
import java.text.ParseException;
import java.util.Date;
import java.util.List;

import at.fhj.itm10.ticketmaster.dao.DAOException;
import at.fhj.itm10.ticketmaster.dao.EventDAO;
import at.fhj.itm10.ticketmaster.entities.Address;
import at.fhj.itm10.ticketmaster.entities.Event;
import at.fhj.itm10.ticketmaster.entities.EventType;

/**
 * Event service.
 * 
 * @author Marvin Puchmüller, Benjamin Hirt
 */
public interface EventService {
	
	void insertEvent(Event event);
	
	void updateEvent(Event event);
	
	void deleteEvent(Event event);
	
	Event findById(long id);
	
	List<Event> findAll();
	
	List<Event> findSameEvents(long id) throws DAOException, SQLException;

	List<Event> findByName(String eventname);

	List<Event> findByCategory(long c_id);

	List<Event> findByDate(String start, String end) throws ParseException;
	
	List<Event> findByAddress(long id);

	List<Event> findTopEvents();

	List<Event> findRandomEvents();
	
	List<Event> findByCustomer(long id);
	
	void setEventdao(final EventDAO eventDAO);
	
	List<Event> doNormalSearch(String namesearch);

	List<Event> doExtendedSearch(Address address, EventType category,
			Date start, Date end);
}